﻿using System.Configuration;
using Framework;

namespace Enterprise
{
    public class HonorConfig : ConfigService
    {
        static HonorConfig()
        {
            ThumbnailWidth = ConfigurationManager.AppSettings["HonorThumbnailWidth"].SafeToInt();
            ThumbnailHeight = ConfigurationManager.AppSettings["HonorThumbnailHeight"].SafeToInt();
            ThumbnailPrefix = ConfigurationManager.AppSettings["HonorThumbnailPrefix"].SafeToString();
            ImageSize = ConfigurationManager.AppSettings["HonorImageSize"].SafeToInt();
            NormalWidth = ConfigurationManager.AppSettings["HonorNormalWidth"].SafeToInt();
            NormalHeight = ConfigurationManager.AppSettings["HonorNormalHeight"].SafeToInt();
            NormalPrefix = ConfigurationManager.AppSettings["HonorNormalPrefix"].SafeToString();
            IsWaterMark = ConfigurationManager.AppSettings["IsHonorWaterMark"].SafeToBool();
            WaterMarkFileName = ConfigurationManager.AppSettings["HonorWaterMarkFileName"].SafeToString();
            WaterMarkRelativePath = ConfigurationManager.AppSettings["HonorWaterMarkRelativePath"].SafeToString();
            IsGenerateThumbnail = ConfigurationManager.AppSettings["IsHonorGenerateThumbnail"].SafeToBool();
            IsGenerateNormal = ConfigurationManager.AppSettings["IsHonorGenerateNormal"].SafeToBool();
            IsAdaptive = ConfigurationManager.AppSettings["IsHonorImageAdaptive"].SafeToBool();
            RelativePath = ConfigurationManager.AppSettings["HonorImageRelativePath"].SafeToString();
        }
        public new static int ThumbnailWidth { get; set; }

        public new static int ThumbnailHeight { get; set; }

        public new static int ImageSize { get; set; }

        public new static bool IsGenerateThumbnail { get; set; }

        public new static string ThumbnailPrefix { get; set; }

        public new static bool IsWaterMark { get; set; }

        public new static string RelativePath { get; set; }

        public new static string WaterMarkFileName { get; set; }

        public new static string WaterMarkRelativePath { get; set; }

        public new static bool IsGenerateNormal { get; set; }

        public new static bool IsAdaptive { get; set; }

        public new static int NormalWidth { get; set; }

        public new static int NormalHeight { get; set; }

        public new static string NormalPrefix { get; set; }
    }
}
